﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="HMS.PL.Forms.Import" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="background-color: White;">
<head runat="server">
    <script type="text/javascript" src="../Scripts/jquery-1.6.1.js"></script>
    <%-- <link type="text/css" rel="stylesheet" href="../themes/ui-lightness/jquery-ui-1.8.16.custom.css" />--%>
    <link type="text/css" href="../themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
    <link type="text/css" rel="stylesheet" href="../Style/!style1.css" />
    <%--jqgrid files--%>
    <link type="text/css" rel="stylesheet" href="../css/ui.jqgrid.css" />
    <link type="text/css" rel="stylesheet" href="../css/ui.multiselect.css" />
    <link type="text/css" rel="stylesheet" href="../Style/common.css" />
    <link type="text/css" rel="stylesheet" href="../themes/redmond/jquery-ui-1.8.1.custom.css" />
    <link type="text/css" rel="stylesheet" href="../css/demos.css" />
    <script src="../Scripts/jquery.layout-latest.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/jquery.jqGrid.min.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.locale-en.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/jqModal.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.base.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.common.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.formedit.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.inlinedit.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.jqueryui.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/jquery.contextmenu.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/jquery.tablednd.js" type="text/javascript"></script>
    <%-- <script src="../Scripts/jqgrid/grid.formedit.js" type="text/javascript"></script>
    <script src="../Scripts/jqgrid/grid.inlinedit.js" type="text/javascript"></script>--%>
    <script src="../Scripts/jqgrid/jqDnR.js" type="text/javascript"></script>
    <script src="../Scripts/simpleresizabletables.js" type="text/javascript"></script>
    <%--     jquery-ui-1.8.1.custom.css--%>
    <%--jqgrid files--%>
    <script type="text/javascript" src="../Scripts/formsScript/welcome.js"></script>
    <script type="text/javascript" src="../Scripts/formsScript/master.js"></script>

    <script type="text/javascript">

        $(document).ready(function () {
           $("#SubmitU").click(function () {
                //debugger;   
                var fname = $('#fileupload1').val();
                var arr = fname.split("\\");
                fname =arr[arr.length-1];

                var fileExtension = fname.substr((fname.lastIndexOf('.') + 1));
                //if (fileExtension == ".xls" || fileExtension == ".xlsx")
                if (fileExtension == "xls" || fileExtension == "xlsx") {
                    $('#txtUpload', window.parent.document).val(fname);
                    document.forms["formImport"].submit();
                    return true;
                }
                else {
                    alert("Please Select Excel file for upload !");
                    return false;
                }
            });
        });        

    </script>
</head>
<body style="margin: 0px; padding: 0px; background-color: White;">
    <form id="formImport" runat="server">
    <div style="margin-top: 0px;">
        <span style="font-size: 1.4em;width:142px;" >Select Excel :</span>&nbsp;
        <asp:FileUpload ID="fileupload1" name="fileupload1" runat="server" accept="application/msexcel" />
        <input id="SubmitU" type="button" value="Submit" class="submit-button" style="height: 24px" />
        <%-- <span id="uploaded_file" runat="server">Uploaded File Name</span>--%>
        <%--   <asp:Label ID="lblUpload" runat="server" >Uploaded File Name </asp:Label>
        <asp:TextBox ID="txtfile" runat="server" ></asp:TextBox>--%>
        <%-- <input type="file" name="FileUpload1" id="fileupload1" runat="server" />--%>
    </div>
    <%--<div class="box_dimension">
        <ul>
            <li class="title">Master</li>
            <li>
                <select style="width: 140px;" id="drp_mstM" name="drp_mstM">
                </select></li>
            <li>
                <input id="MSubmit_Rule" type="button" value="Import Data" class="submit-button"
                    style="height: 24px" /></li>
        </ul>
    </div>--%>
    </form>
</body>
</html>
